package com.qf.mapper;

import com.qf.entity.MallGoodsSpecEntity;
import com.qf.entity.MallGoodsSpecOptionsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MallGoodsMapper {
    List<MallGoodsSpecOptionsEntity> findByPage(MallGoodsSpecOptionsEntity entity);

    //传递属性id
    int delete(String id);

    @Select("select * from mall_goods_spec where spec_name=#{name}")
    MallGoodsSpecEntity findBySpecName(String name);

    MallGoodsSpecOptionsEntity findByOptionName(String name);


    @Select("select * from mall_goods_spec")
    List<MallGoodsSpecEntity> findAll();

    int add1(MallGoodsSpecOptionsEntity entity);

    int add2(MallGoodsSpecEntity entity);

    int update(MallGoodsSpecOptionsEntity entity);
}
